package com.vj.space.api.modules.controller;

import com.vj.space.api.common.utils.R;
import com.vj.space.api.modules.entity.User;
import com.vj.space.api.modules.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    private R result = new R();

    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public R login(@RequestBody User user){

        return result.ok(userService.login(user));

    }

}
